import bottomBar from "./components/bottom_bar.vue"
export default {
  data() {
    return {
      content: '<h2>哈哈哈</h2>',
      popup_show: false,
      myLocation: {},
      id: "",
      dataDetail: {},
      info: false
    };
  },
  mounted() {
    this.id = this.$route.params.id;
    this.myLocation = JSON.parse(localStorage.getItem("myLocation"));
    this.getData();
  },
  methods: {
    // 跳转技能服务
    goSkillService(id) {
      this.$router.push(
        this.fun.getUrl("anytimeSkillService", {id})
      );
    },
    getData() {
      $http.get("plugin.be-within-call.frontend.index.shifu", { 
        lng: this.myLocation ? this.myLocation.point.lng : "",
        lat: this.myLocation ? this.myLocation.point.lat : "",
        sid: this.id
      }).then(({ data , result , msg }) => {
        console.log(data , result , msg,4444);
        if (result) {
          this.dataDetail = data;
          this.info = true;
        } else {
          this.$toast(msg);
        }
      });
    },
  },
  components: { bottomBar }
};
